package com.doubao.hardware.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.doubao.hardware.entity.DeviceConfigEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 设备配置Mapper接口
 */
@Mapper
public interface DeviceConfigMapper extends BaseMapper<DeviceConfigEntity> {

    /**
     * 根据设备ID查询设备配置
     * @param deviceId 设备ID
     * @return 设备配置实体
     */
    @Select("SELECT * FROM device_config WHERE device_id = #{deviceId} LIMIT 1")
    DeviceConfigEntity selectByDeviceId(@Param("deviceId") String deviceId);
}